package com.xbongbong.sso.domain.dao;

import com.xbongbong.sso.domain.entity.OauthConnectorEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * 授权连接器
 */
@Repository
@Mapper
public interface OauthConnectorDao {

    Long insert(OauthConnectorEntity oauthConnectorEntity);

    Long update(OauthConnectorEntity oauthConnectorEntity);

    Long deleteByKey(@Param("key") Long key, @Param("corpid") String corpid);

    List<OauthConnectorEntity> findEntitys(@Param("param") Map<String, Object> param);

    OauthConnectorEntity getByKey(@Param("key") Long key, @Param("corpid") String corpid);

    Integer getEntitysCount(@Param("param") Map<String, Object> param);

    OauthConnectorEntity getByConnectorSign(@Param("connectorSign") String connectorSign);
}
